<?php

$id = mysql_connect("192.168.2.4", "nmps", "nmps@))*mysql") or die('连接失败:' . mysql_error());
if (mysql_select_db("testitrial", $id))
    echo "";
else
    echo ('数据库选择失败:' . mysql_error());
mysql_query("set names latin1");

$query = mysql_query("select * from blog_category");
if(mysql_num_rows($query))
    echo '<pre>' . var_export($query, 1) . '</pre>';
?>